/**
 *  
 *  @author zulianp@lu.unisi.ch & remo.lemma@lu.unisi.ch
 */

package ch.unisi.inf.projects.java.uom.gui.commands;

import java.awt.Toolkit;
import java.awt.event.ActionEvent;
import java.awt.event.KeyEvent;
import javax.swing.KeyStroke;

import ch.unisi.inf.projects.java.uom.gui.UOMImages;
import ch.unisi.inf.projects.java.uom.gui.itemclasseditor.UOMItemClassDeleterDialog;

public final class ItemClassGUIDeleteCommand extends IconedCommand {
	/** We are not going to serialize this class atm */
	private static final long serialVersionUID = -1L;
		
    public ItemClassGUIDeleteCommand()
    {
    	super("", "Deletes an already existing category", UOMImages.REMOVE.getFileName());
        putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_P, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask()));
    }
    
    public void actionPerformed(final ActionEvent ev)
    {
    	final UOMItemClassDeleterDialog iCEDialog = new UOMItemClassDeleterDialog();
    	iCEDialog.setVisible(true);
    	iCEDialog.repaint();
    }
}
